<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>#{$sys.title}#</title>
    <meta name="keywords" content="#{$sys.title}#  #{$sys.name}# #{$sys.companyname}#">
    <meta name="description" content="#{$sys.title}#  #{$sys.name}# #{$sys.companyname}#">
    <script>
        addEventListener("load", function () {
            setTimeout(hideURLbar, 0);
        }, false);

        function hideURLbar() {
            window.scrollTo(0, 1);
        }
    </script>
    <!-- Meta tags -->
    <!--stylesheets-->
    <link rel="shortcut icon" href="http://video.sdtanyue.com/png/favicon.png" type="image/vnd.microsoft.icon">
    <link href="#{$smarty.const.APP}#/View/template/login/css/style.css" rel='stylesheet' type='text/css' media="all">
    <!--//style sheet end here-->
    <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <script>if (window.top !== window.self) {
            window.top.location = window.location;
        }
    </script>
    <style>
        .logo_sdty {
            margin-bottom: 20px;
        }
    </style>
</head>

<body class="gray-bg">
    <div class="mid-class">
        <div class="art-right-w3ls">
            <div class="logo_sdty"><img src="#{$smarty.const.APP}#/View/template/img/logo1.png" height="50"></div>
            <form action="#{$smarty.const.ACT}#/sysmanage/Login/login/" method="post">
                <div class="main">
                    <div class="form-left-to-w3l">
                        <input type="text" name="account" placeholder="请输入用户名" required="">
                    </div>
                    <div class="form-left-to-w3l ">
                        <input type="password" name="password" placeholder="请输入密码" required="">
                        <div class="clear"></div>
                    </div>
                </div>
                <div class="left-side-forget">
                    <!-- <input type="checkbox" class="checked"> -->
                    <!-- <span class="remenber-me">记住密码 </span> -->
                    <button type="button" class="login-btn">登 录</button>
                </div>
                <div class="clear"></div>
            </form>
        </div>
    </div>
    <!-- 全局js -->
    <script src="#{$smarty.const.APP}#/View/template/js/jquery.min.js?v=2.1.4"></script>
    <script src="#{$smarty.const.APP}#/View/template/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- layer javascript -->
    <script src="#{$smarty.const.APP}#/View/template/js/plugins/layer/layer.min.js"></script>
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?6cbae336ef2e6fc07bbcab9a0872e082";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
        //回车登录
        $("body").keydown(function (event) {//当按下按键时
            if (event.which == 13) {//.which属性判断按下的是哪个键，回车键的键位序号为13
                ajaxlogin();
            }
        });
        //点击登录
        $("body").on("click", ".login-btn", function () {
            ajaxlogin();
        });

        //登录提示
        function ajaxlogin() {
            FormData = $("form").serialize();
            $.ajax({
                type: "POST",
                url: "#{$smarty.const.ACT}#/sysmanage/Login/login_auth/",
                data: FormData,
                dataType: "json",
                success: function (data) {
                    if (data.statusCode == '200') {
                        layer.msg('操作成功', { icon: 1 });
                        window.location.href = data.message;
                    } else {
                        layer.msg(data.message, { icon: 5 });
                    }
                }
            });
        }
    </script>
</body>

</html>